﻿using System.Diagnostics.CodeAnalysis;

namespace EnterpriseLibraryExtensions.Events
{
    /// <summary>
    /// The IEventProducer interface supports raising events in the eventing system.
    /// </summary>
    public interface IEventProducer
    {
        /// <summary>
        /// Raise an event of type TEventType.
        /// </summary>
        /// <typeparam name="TEventType">The type of event to raise.</typeparam>
        /// <param name="sender">The instance that raised the event. This value can be null.</param>
        /// <param name="args">The arguments associated with the event. This value cannot be null.</param>
        [SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", Justification = "This is the intended signature.")]
        void Raise<TEventType>(object sender, TEventType args) where TEventType : class;
    }
}
